console.log("hello");
//以下展示了四种列表结构
let arr = [1,2,3,4]
//取一个元素
console.log(arr[1]);
//用三个变量取三个元素
let [a1,a2,a3] = ["hello","world","ok"]
console.log(a3,a2,a1);
//用省略号取剩下的元素
let [x1,x2,...x3] = [1,2,3,4,5,6,7]
console.log(x1);
console.log(x2);
console.log(x3);

//字典结构
//js，一个字典就是一个对象
let user = {username:'老张',age:22}
console.log(user.username,user.age);
//用usersname来获取user这个字典中的username
/**
 * {
 *  data:{
 *    user:
 *  },
 *  status:200,
 * }
 * 
 * 
 */
let {username,age} = user
console.log(username);
console.log(age);

let {username:uname,age:uage} = user
console.log(uname,age);







